Skip to content

Automatic port for manual tests.#1339

Merged
przemyslaw-zan merged 4 commits intomasterfrom
ci/4352
Apr 2, 2026
Merged

Automatic port for manual tests.#1339
przemyslaw-zan merged 4 commits intomasterfrom
ci/4352

Conversation

@przemyslaw-zan
Copy link
Copy Markdown
Member

@przemyslaw-zan przemyslaw-zan commented Mar 31, 2026

🚀 Summary

The manual test server (createserver.js) now automatically finds a free port at startup. When the preferred port (default 8125) is already in use, it tries subsequent ports via recursive tryListenOnPort until a free one is found, with server.close() on each failed attempt to release the handle. The --port CLI option sets the starting port. Tests cover port retry on EADDRINUSE, rejection on other errors, and all existing behavior updated to use async server.listen with callbacks.


📌 Related issues


💡 Additional information

Testing: Block the port 8125 with any server, then launch manual tests. They should start at 8126.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link
Copy Markdown
Contributor

@martnpaneq martnpaneq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to implement a new approach without the need of creating a .port file.

@przemyslaw-zan przemyslaw-zan merged commit 0083e03 into master Apr 2, 2026
8 checks passed
@przemyslaw-zan przemyslaw-zan deleted the ci/4352 branch April 2, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants